Merged with master
Fixed various problems from merges