Changed relation types to has_one/has_many