Some more utils broken out into scripts.
Delete old unused functions.