Add first class shape support and refactor the VM
Finish shape migration