version 0 tables inserts completed.

more tests needed.

make the code look better