Minor refactoring tweaks... test case is busted