Added additional CompoundFunction support.
Added more Javadocs.