Refactored site generator