Added functions to creat a button and a control