Made use of arel when constructing queries.
Remove unnecessary string internments
Moved nested_set_scope to the class level to avoid duplication.
Merge pull request #196 from collectiveidea/refactor

Refactor