Some changes and some fixes