Removed debug messages
Fixed deprecated syntax