Big 'ol merge

Lots of code and stuff.