Mark local functions as static.
Mark a header function as inline.
Remove a C-style-cast.
Add missing includes.
Add virtual destructors.

Base classes with virtual functions often need a virtual desctructor,
especially if the base class is abstract.