script cleanup

@ericjungu self-merging