Fixed http:// appending function.
Beautified code.