Refactor associations model