reworked most of the custom types.
still need to clean up cruft.
removing debug stuff. fixing ints