Revert "OK, erasing is a MAJOR performance issue"

This reverts commit e0d74cccbd22c1eaf74512dac222435787948655.
Revert "use static ints instead of #defines"

This reverts commit 716e3826f057c5874e999165d30ec7c7ec8c1a85.