Refacoring methods in thingControl