Added timeout to XMLHttpRequest in loadTextFileAsync, and corrected comments.