added haml and formatting issues page, refactoring logic