Update blog_models.js

Addes some functions and code improvements.