Fixed compilation errors
Implemented vm::ptr & vm::ref