The code REX [H.C. Kaufmann and K.R. Akselsson, Adv. X-ray Anal. 18 (1975) 353] and its successor, HEX were developed at Florida State University and University of Lund in the early seventies for quantitative reduction of PIXE spectra. HEX modelled many of the physical processes, including target self-absorption. Lack of adequate documentation and several inherent software related problems hampered widespread adoption and further development. HEX was designed using a hierarchical functional design approach, coded in FORTRAN IV. Its element library and request list are tightly constrained. ANSI standard FORTRAN provides few structured constructs, nor does it support dynamic data structures. HEX has a batch mode of interaction which affords minimal (interim) user interactions. To overcome these limitations we have modernised the program to run on IBM PC compatible computers by using object-oriented design techniques, documented in Program Description Language (pseudo-code) and implemented in a modern programming language, Pascal. Turbo Pascal 5.5 provides an integrated program development environment, a high resolution graphics library, an operating system interface and many software development tools to improve programmer productivity. A menu-based highly interactive screen management library is used for the user interface. A demonstration version is available for user evaluation. Further rigorous testing and the development of user acquired spectra interfacing code will be developed before the first release. The renovated code, WITS-HEX, has extracted the intellectual value embodied in HEX. It will be inherently more stable, reliable, versatile, maintainable and easy to use to facilitate future process modifications.