some major cleanup
ready to go on a server...hopefully