reaktor: refactor code for moar abstraction