Keybindings can now be written back to keybindings file. Also made some memory allocations more flexible.