In progress porting to fig - basic run working but with some rendering issues