Added database to work with... refactored base blog template