main page refactor