updated code (initial commit)
Merge pull request #3 from RoanKanninga/master

updated some uncommited code from Juha, Marc-Jan and Harm-Jan