Fixes for merge with master

Basic fixes to get it to work like master