refactored silliness with type functions into an actual class structure. thats what i get for trying to be cute