Updated version removed some debug code