clean up server some more by moving stuff to controllers