Refactored code
Merge pull request #1 from RikHeijdens/v2

Refactored code