complete rewrite of meta.js - better plugin logic