Added needed glBindVertexArray and removed some calls that generated gl error. Do not bind program object without first compiling and linking. Also, glVertexAttribPointer needs vertex array object bound (this wasn't needed before).