A few bugs fixes also a syntax change, version bumped to 1.0.2.