Increment patch version to 0.2.1
Factor out common code