Minor Code changes and commenting