Refactors almost all scopes to use Rails 3/4 style

Hi,

I had some spare time, so I did some refactoring of many AR queries from old Hash style to Rails 3/4 new style :grin:.
This passes tests of course.