Fix bugs, add some API v.1 methods