Work in progress. Some changes fixed.