use atomic bool for global flags to prevent data races
minor changes to use string
prepare to allow for the use of Boost, Boost is just too powerful to ignore