meta.js refactor