Adds Gemfile so other users can run tests

Also refactors a method for readability