many fixes of structure and typos