Refactored out common code into epms-common