Refactor param handling, add a permanent whitelist