cleaning up names, fixing up types