Update oldnum macro, use smarter indexing.