"minor refactoring"

@martin-g if you've some spare time feel free to review this pr ;)

contains: #136 , #144 , #146 , #135 , #145 , #148