Refactor api_server with Flask Blueprints