added comments; moved html to templates