Refactored inmag, non blocking and added pause state

Started on outmag, however, I want to test the input magazine before I
fully jump into output magazine