Getting rid of some code smells

Fixes #14