Refactor to cull dead code.