code cleanup and grammer fix