Refactor database code. Add recent posts display with automatic updating.