Clean up use of die() and thePlatform-proxy.php