Add virtual destructor
Improve code format