Added capability for functions and depends statements (when they are added). Also improved printing method