Reorganize code base
Add connect task, reorganize code base