refactored my code to more object oriented.  Instructions now have a run(ref reg[], ref RAM) command that they inherit from the overall instruction class.