Fixed some bugs and updated README