Remove "restrict" controller option
Formatting/comments
Reorganize middleware