Updated README and some minor code improvements.