Use absint() instead of (int) throughout