Moved BlogHandler and utility functions out of main.py