Fixed typos, added comments and header