More cleanups,
code cleanups; no functional changes
Now flushing freelist after every 1000 ops