Code cleanup. Created a macro header file. Strange bug where the process will stack dump when  it stackdumps on first run of the process.