Removed debug console message and some unused code