Rewrite the code.
Merge pull request #2 from Novatux/master

Rewrite the code.