Argument refactoring and sanity checking.