Use base class for event loops and remove ByteStream layer