Fixed issue #4 and a few typos