Modified Instruction class.

Encapsulated the GetPreceding and GetNext functions.