Added more tests and fixed destroyAll callback issue