move some general classes from visualize to algebra