Code cleanup and added glPolygonOffset