Refactor site

Some WIP refactoring of the `Site` class which is way too crowded.