started to fix site context and refactor