Finish implementation of comments and add unittest.