Tweaks and bugfixes to get to first working rev