Refactor gemfile