Add API to access data
Refactoring: use sqlite3 shotcut methods
Handle CORS correctly in API