Use AcidState instead of keeping everything in memory. Fixes #11, #12