Restructured Magic Model

Also scratched and reqrote the magic model to serve as both definition
and model in Views.