Merged in code changes from shell
Removed shell specific code from common.js