Adding field auto-detection.

And moving attrs over to the engine.