implemented duplication prevention, changed constants, added generate button