Fix bugs. Add new methods.