Checkbox for iteration

Added the option to handle whether the user wants to iterate through the
assignment of button mappings or assign them one at a time.

fixed formatting issues and code style.