Reorganize gem to compile with ruby2