Output is now correct but doing some refactoring.

Making instructions into separate classes so that others can be added
more easily if needed in future.