Some refactoring
Merge pull request #3 from Cronom/master

Some refactoring and references