Fix bug #44.
Add ControlFactory for creating general controls.

Refactor horizontal separator related codes.