Add pool tests to runner.
Auto fix equality with None to IS NULL, fix dead code and some old bugs.
Merge branch 'master' into pool
Cleaning up close logic.