Small bugfixes. Removed debug messages.