moving messages into main program, calls to msg and debug exported with extern