Seperate out parser logic from program.js