Add type signatures to most of the functions. Refactor decorating Function prototype with autoCurry().