Replace formencode with our own solution, due to formencode not working with Python3