Some refactoring and version change for PR#20.