modify associations

change from has_and_belongs_to_many to has_many :through as it fits better and is better long-term.