Made code converting much more modular

I need to go in and give all the inputs a data-key attr because having multiple inputs with the same name is causing conflicts