Updated bunch of stuff

Still needs documentation.