refactored panel object for easier opengl manipulation.