Starting to generalize/convert classes for use as a library