Fixed word add bug
Refactored homepage script