Bug fixing in logic
More tracking data
some debug code added