Fix display bug of EndLoopBrick in action mode
Add test for CheckBox visibility

Also refactor a little bit