Ontology state poller rewritten. Fixes #100.