Implemented isValidWord
cleanup and added more dependency uncoupling