Add recursive checkbox, refactor