Common classes used by the console implementation.