Refactor WordPanel construction