removed whitespace
pulled common code into layout template