Small api improvements