Fix comparison return values and implement Integer truncation