refactor and use layouts and includes