added printStacktraces to all catches and refactored some method names