Re-organize the public API a little bit