added comments and cleaned up
add resources to split out HTML and js