Quick pass at code quality

- Fix potential crashes in poll, WotD, and doc functions
- Fix .newbie
- Declare i in for loops
- Add missing semicolons