got menu system working better, fixed some memory leaks