Specify gem versions
Refactor