Build main structer.