Put matrix into render namespace
Get rid of spinlock