default scope removed and required scopes added
name of the instance variables changed acc to the need
name of the associations changed acc to the need
changes make due to name changes of associations and adding of required scopes