Corrected the form of delete for the character array and clean-up in main (needs more work)