added helper class for param/state handling and updated sample to use