fixed layouts for the tests passing
refactored code and passing tests
fixed and finished static pages