Added delegate methods and relayout buttons