Updates and refactors.

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