Fixed paramater merging and added optional values