Megamerge

Merging all the changes from what started as John's branch.