replace all instances of level keyword with switchlevel and update commenting for function parameter info