Moved some of code to HTML to allow for ease of formatting