Modularise scopes.rb into respective databases

Nice gem, thanks!