Refactoring and documentation
Merge pull request #3 from wagnert/master

Refactoring and documentation