changing clean method to use the config's user
refactoring code related to associations