improved AttrDict in Models, changed tabs to spaces in *