linking and layout fixes