schema v2.0

Code cleaning and optimization