Pre v2

Merge changes back into master.