server refactor; create component handlers