removing unused variable
Fixing build warnings
Adding virtual destructor to Shape class
Fixing warnings and out-of-range index.
removing unused variables