Some bug fixes and updated README