Update readme and fix bugs