Refactors as per PR comments, new error_count and warning_Count options