Implements functions: move decls to top and split decls and assignments.