Refactor the html structure to support sliding pages