Edited CreateButton() method.