More work on base.js