working xmlhttp and more file organization