Refactor and add tests for site addition. Add helpers for site testing.