Added debug checks for gl functions. Such hack!
Added shader link check, and changed glEnableVertexArrayAttrib to glEnableVertexAttribArray.