Strip out dead code, alter status handling slightly.