Move association parameters code to separate class