Replaced all throws clauses with try-catch clauses. Thx to netBeans.