Cleaned up the script some.