Fix Jia settings inheritance and add ALLOW_PYCODE setting

Fixes #144