Fixed bug with submitting an empty url.
Cleaned up a bit more.