Refactoring HTML (raised cursor bug)