well push and pop are quite easy..
you push the current matrix
you manipulate the matrix (rotate, translate etc)
you pop it back to the state it was before
that means:
glLoadIdentity();
setupview();
for every model {
glPushMatrix();
glTranslate(model.x,model.y,model.z);
//possibly some rotate and scale as well..
glBegin(GL_TRIANGLES); {
glVertex(...);
} glEnd();
}
and, cause you design it bether, its in the modelclass..
Model::GLDraw() {
glPushMatrix(); {
glTranslatef(x,y,z);
DrawMesh();
}glPopMatrix();
}
that way your models are free.. everyone has its own position stored, and they are drawn at this very position..
nice, not?

second question:
i never use lists.. dunno, i don''t like static stuff..
if your meshes have animations, you cannot use lists that easy anymore..
"take a look around" - limp bizkit
www.google.com