restore javascript structure and create haml files for teasers and homepage