Updated HTML and added a few helper functions