move to static for flask usage
Cleanup. Return features in JSON.