cleanup to get usable script