Fix typos and handle params with whitespace in names