Many changes and refinements