Minor changes and some fixes