consolidated  try-catch blocks and removed some un-needed ones.