moved replaceDir and nukeDir into stringState and fixed the empty case of mapBack
a function for delegating calls to members