Fixed issue with return code of the remove_index method.
Removed some debug code