Moved checks for unused variables and parameters into their own module.