Undo pedantic bullshit
Don't lose trailing slash or port information
Improve comments