Refactoring to use batata.js