Made a number of types internal, added file upload handler