Seperated out the logic to build the form into a file, formbuilder.js