Fixes and updates

@phgross Here the first pullrequest with some changes as discussed. It also includes some fixes and the adjustment to the 4tw standards.

Fixes #2