small changes, improving code
Merge pull request #136 from Tieske/refactored

small changes, improving some code