clean up messy scripts, adjust some minor stuff