Ensured I was defining every module, not requiring it. This also solved
the controller being undefined issue.