refactor layout to haml