MEKD: Cleanup for older compilers. Some test code added.