Added Rspec tests and refactored wordsearch script to reduce unnecessary instance variables.