Major refactoring, stability fixes

Signed-off-by: Dakota Bailey <dbailey@pivotallabs.com>