Fixed form rendering problems
Cut out old code
Documentation for macros and js
Fixed template issues and moved js to own file