Many fixes because of review comments