Created and fixed all bugs for belongs_to and has_many