Refactor reactor class