Fixed object based vs. constructor based blog example code to be DRY