Implement settings

DRY: Split this foreach into a function to generate attributes HTML?