restraintd: status handler refactored

Refactored status handler a bit so that it is much more readable.