Removed several usages of last()