some fixes in templates, update db, & put some js