Fixed undefined variable
Refactored tweet model