Added initial logic to hopefully allow functions to take and return parameters.