Added Settings Menu, fixed memory leaks.