Code cleanup, removed debug code