minor cleanups (globals->locals, renamed tilo.compare into tilo.order)