Added smarter encoding method
Bumped to version 1.0.3