Added some comments, moved messages to "debug mode"