Separation of rest_api from flask
PEP8 fixes