Completed HTML validation, refactor