ported John's latest to my refactor; fiddled with some FX code