Revert "Continued iteration of lastOf implementation"

This reverts commit 70e0ec05af27448b88a60703a5429e04e54460b1.