more tweaking & some bugfixes