Some minor cleanup of miscfunctions