Cleaner code, first and third part finished with tests.
Merge pull request #11 from cravacuore/develop

Cleaner code, first and third part finished with tests.