Remove unused code from emperor.js