bug fixes, reorg, new tables, new models (time units, magic related)

pushing to dotcloud