Added some functions and nested data structure capability for complex functions.