Replace all unsafe uses of eval with ast.literal_eval and hasattr/getattr
Fixes, performance tweaks
More performance improvements, fixes