Change to use REST API and MongoDB