Implemented (but have not yet tested) the instruction generator. Compiles with warnings.