Implement test for debug method

Also, remove logging function.
Refactoring
Enhance Component base class

Model property can be accessed as if the component is a sequence.
Make dialog iterable and model properties accessible