Removed memory modules from fifo, replaces with reg's
working on flag logic