cleaning up and adding first code for handling Associations