Some more parameter sanity and cleanup