Properly sanitize URLs before use.
Fixed incorrect variable reference.
Fixed incorrect variable reference.
Removed functionality - no longer needed.
Updated with latest changes.