Changes m model to a proper structure, syntax and indentation nitpicks, begins permissions stuff