Extra API redirection

- Reorganize views.py so helper functions are at the top of the module
- Remove duplicate code for redirecting to latest
- Add redirection to latest when version is not given in extra API
- Add 404 tests for extra API