Added main and tui. Modified observer pattern.