clean up system calls
attach type handlers to built-in prototypes