simplify logic in factory and remove unused variable
remove unused variable from parser
Removing parser class, no reason why these can't be functions with a couple of global variables