Rework Schema source model and optimize schema SQL. Not complete.