updated comments and fixed comment line checking logic.