Merging in some remaining changes from schotime-dev2.0