Move a few functions to a new location
Exit with 1 instead of returning in the compare gem function
Add parens around the compare gem function's arguments