Updated code for some minor tweaks  .