mostly scope refactoring
cleaning up the gemfile