Random changes + api improvements.