major refactor

Restructuring application, removing secondary api server.