This is legacy developmental code, left here for ideas and for simpler back-porting...