refactor code, improved errorhelper class