Update rest methods

- use MethodView for rest calls
- move rest methods to rest.py
- fix tests and __init__.py's