Little stuff stolen from Various forks + URL regex thing