cleaning up code and add comments, changed id to slug for blog model