Minor changes and some cleanup