Add master file for imports and utility functions
convert ONS and SSA scripts to enclosed functions. Move/remove imports. rm some cleanup lines.