ClientAgent: Fixes post-remove test and adds post-remove functionality to CA