Move some oddly placed accounting code