Added test for randomString and cleaned up that function to remove weird logic and use of eval.

: restructure