more work on partials and simplifying code but layout needs working on again