added ability to pass string of jade to compile
made template take locals and components