Issue #58: minor refactoring / moving around