Pagecontainer: Factor path and base logic out of pagecontainer