Change functionality to calculate base URL

Refactor for new web container API