Adds a loop and removes console.log tests and comments
generateForm works but needs to be rewritten using fragments