Update readme and fix some bugs