changing some try-catches
Refactoring some methods