Sloppy implementation of checking HTML read from URL