Cleaned up script and added comment