More tweaks and porting bugs.