Minor function cleanup