Refactor click handling, link checking, and url parsing into classes; ensure absolute urls used for cache keys and state objects.