Restructuring for more serious development with implementation of a RESTful API.