Update VMLib.java

updated new code.
cleaned up old code.