agent: Removal of unneeded code.