Added tests and a remove callback function