Basic reorganization of the code

Reorganized so that the default/direct mapping could be added though
keeping (for now) the template stuff.