Brought in changes from theJenix/ABAGAIL, as pushkar/ABAGAIL is the official project