Add prototypes for functions useful in js.