On classical nonequilibrium thermodynamics and its extensions