Refactored the code for simplicity; added compiler and VM