Cleaned up  &  code in scripts