uses phantoms document load rather than jQuery
adds error handling support
abstracts file paths