Rewrite of wordsearch script into class