Ensure the arguments are initialized. Also miscellaneous CG cleanup.