Updated global variables. Now in Ruby style. Added arrays of input and output tables