Added more comments, tests