move and refactor vm analysis

Requires #1177 & #1173