Add layout, and start refactoring tests