Add mongodb support. Add outline for API methods in server