Made functions work

Up next: handing parameter lists