more tweaks and testing with core data