Added REPL, trace flag to command

reworked how primitives get defined