Code cleanup, wider use of forward declarations.