Adding tests and comments