Fixed several typos, added test scripts