Correctly set base url ( fix #13 )
Added better valdation (fixes #3 )