Error reporting settings and some cleanup