Add memory mode and expose the modes. Closes #10