Fixed problems with creating tables from sql tables when the names should be different.
Cleaning up doc