Schema upgrade

Modified the schema for a better structure