format date in templates
fix crash
add missing js file - fixes #17