Refactored some try/catches