Breaking out the html and javascript functions into seperate modules