Remove tm.h and xm.h handling, as it wasn't used. Use nm.h only when needed.