Extracted addButton and removeButton to functions