Finished the opcode implementations.  Added some helper functions.

Some of these helper functions aren't added to the header yet so they will have to be at some point