Code cleanup
Enhance smart type mapping
Almost done, the last mile