Start cleaning up for new REST API.