Some OpenGL updates to improve speed

Also: removed uneseccary thread and wrong statement.