fixing typos, clearing code adding some comments