Changed from has_many, through to has_and_belongs_to_many for many to many relationship generation