Cleaning.
Missed delimeter var for string end.
satitize function now url_sanitize and tidied up base directory object.