Factory Resetting Phone w/ out computer
To remove the jailbreak it is advised to restore the iPhone from the computer, but as you have already reset it mannually I would suggest to download the latest firmware from here, and then put the phone iPhone into DFU mode. Open iTunes and press the restore button holding the option + Restore if on a mac, or Shift + Restore if on PC and select the downloaded ipsw file. This should remove the jailbreak and put you to the latest iOS version for your iPhone.