Changed stage enum to use ints. Modified few other things in pipelining
class