API updates and reorganization.

Signed-off-by: King Lemming <kinglemming@gmail.com>