misc. code cleanup
restore double curlies in javascript for pyrex template compatability
CaPiTaLiZaTiOn