Lots of fixes + mixins + templates