Cleaned up the scripts to flow better.