Removed a lot of code, much of the functionality to be replaced as a service soon