Auto-resize buffer size in buffer pool
Some cleanup