Cleaned up script a little.