Set async to false for JS to fix #12. Also added an optional partial for JS in views.