Refactor
Move db functions to separate file
Add generateHtml()
Change timestamp format
Improve generateHtml()
Add timeago plugin
Update generateHtml()