Fixed a couple of bugs and updated README