Major refactor of API to support full mobile application