make /api route case insensitive
Fix wrong template html nesting