Cleaned up :handle-ok, added function to extract base-url from ctx