Rebuild backend design

Datatypes, and bug with Mixed datatypes.