move layout functions to layout.clj