JSHint, general re-organisation / re-factor, fixed bug when items have margins