Updated so that it integrates better with expressionjs