Feature/further error handling refactoring