Moved to flask. Implemented initial events API.