Clean up script a bit.