Refractored lot of code.
Removed vm housing. Replaced it with a generic vm file.