Feature/api driven server

Not done completely but going to merge in the changes before they become too breaking