Minor code cleanups; fixed typo in readme