Updated menu creation code for python 3

Menus still aren't actually created, however.
Fixed incorrect text decoding