adjusting layout
eliminated unnecessary casts
avoid double add of button by both Add and Attach