Added UnitTest and minor changes

Added result checking and large data set tests.
Fixed an issue where ArrayReplace would error out if you didn't provide
rules.