Cleaned up duplicate code
Refactored word repository to proper unit test