Initial refactor. #93 #94 #96