Fixed a couple bugs in main

I did not delete a pointer before re-assignment; also, some messages
were wrong.
Added calls to getVal() inside functions

To show how polymorphism works (or doesn't), I included calls to the
virtual getVal() function inside the functions that are passed
arguments.