Merged mhimmer-master, also made some bugfixes