Fixed db path in debug mode
Changed URLs in templates to be generated by Flask