refactor lib/gearsloth.js, fix tests
fixed conflicts