Cleaned up script for reading html