Refactor code use jade mixins to reduce code