Tweaks to inline script PR

* Use `xhr` module
* Ignore async stuff, just load it as it can (similar to React's loading)
* Improve event registration
* Minor tweaks