Setting baseurl option, and cleanup