Still need to document a lot of functions, but I cleaned up and explained a lot of the code via comments.
kttools.h/c is a lib for converting types (only currently contains i_to_str). Also added a printf for i/o.