Rewrite the shit out of apm-update