Refactored sites controller