Class structure updated. Main moved to host method