Use raw vars due to circular structure

Fixes #147
Update base URL regex