Refactored code.
Merge pull request #18 from tholzschuh/master

Refactored code.