Improved ErrorDetection.java by removing unnecessary code to add extra zeroes