cleaned code
Added also "add" button management