Rewrote the library to split code in small pieces.
Merge pull request #4 from khamaileon/refactor

Rewrote the library to split code in small pieces.