Consolidate commands.js into utils.js