make all the scripts into classes, fix gemfile, almost gem-ready