Cleaned up the script