more tweaks, mostly functional - still needs tests