Got entity writing done.

also got split done for reading