- less code repetitions
- some style fixes
#6