That was painful.

Partway through a refactor that will make these stable.

any return 1 should be considered a fail.