Mesh attribute binding fix and the indexed draw function

Should be accepted after #33 (includes these changes).