fix some bugs, add javascript/stylesheets back