Refactored Testnet diff. calc and bug fixes