restructured site-dependent code