Optimize toStringFromBoolean mmethod to immediately return an array of Module strings rather than an object of string-string objects that needs to be filtered and manipulated further.