refactored beans and tests in order to match repository package