refactored generated controllers to two layers for code sharing with sockets. created api design for custom database management