Refactored layouts + rspec tests.