fixed memory leak, added basic main()

added destructors to pop off elements stored in vector