Merged with HEAD, fixed conflicts
Also fixed a few little things; added some comments.
I know this is Will's branch but #yolo anyway so w/e.