Added init to select what mode to work in.