Start to incorporate new database-backed API

Note that some functionality (including the My Events activity) is
currently broken