Fix some errors. Activate debug for gl context. Add unit test for vertex buffers.