Added support for mapping/reducing vectors.  Added dependency resolution to reorder function definitions; no more predeclarations.