Cleanup passed parameters. Should really be a small container class for temp data instead