Add NBUTLAST. Rewrite BUTLAST to be O(n).