Revoke task feature almost implemented, dealing with one blocking error at the moment. Part of #825
Also removed some debugging error_log()s