Updates and stuff

Generally cleaned up the code, comments and stuff