lambdas for scopes - rails 4 compatibility
scopes and all modified to Rails 4 compat
rails 4 compat + scopes fix