update version
strip whitespace around parsed options and minor refactoring