Updates to clean script; added utility function script