Refactored expression.js