Code improved according to suggestions. First tests for comments.