bugfix
adding debug script
using optimist for bot line parsing
adding doc
favoring hasMode()
privatizing members
adding test