Added Time class.
Several minor changes.