Reactor completely refactored. Not tested.