Removed debug code
Fixed tests