Refactor for smaller code base

- compressUrl was pretty dumb, removed
- we can rely on doc.baseURI
- remove some unnecessary abstractions