Eliminate a few more sources of failure + refactor