moved state polling loop into application code. Does not belong into the
module.
feature description.