fixing orthographic errors and redundant statements