Created class 'var' to hold variables and to decouple things more. finished variable-elimination algorithm