Optionmenu and some memory/structure fixes