created a layout file, stripped views of duplicate code