Starts fixing the mess that is the layout system. Introduces a distinction between type and layout