Refactor stmt store for enhanced performance