fix terrible async issue when detecting dynamic content

promises ftw!
switch templates to jade using precompiler