CLean up proof of work for performance and clarity.