Merge pull request #19 from griera/master

Cleans the code and adds new documentation.