fix types of buttons and segfault
move data to ctrl. Add constructor
move data to ctrl. Add constructor (other files)