More flash algorithm tweaks.