Some API refactor. I may have missed some.

Signed-off-by: William Lebel <lebelwilliam@gmail.com>