remove state class
Added Duration class which utilizes the factory pattern