More cleanup, refined scripts a bit