Refactor internal expressions