Some function cleanup.