fixed _to_python on fields and added in a few optimizations