More work on gl matrix