Finished function parameters. I think everything works now, but there's still more testing to do.