Cleaned and removed debug code.