Cleanups to rules/persistence adapter code.