move database stuff from Edition to EditionManager class and other cleanups