nim comments and some simplification