remove border size in card dimension computation and code cleanup