Purify the accounting code