Update copy-code so it copies the hash tables instead of passing references to them

Change the way register names are emitted into IR.
Add if statement and flow control primitives