Improved URL handling and other fixes

Can we file that under new features?