Test refactor fixes #191