Slight refactoring of tests and executable