Refactoring the opengl package with abstractshape class