Simplified the AppController even further.

- Removed the prepareForPjax method.
- Removed unneeded comments.
- Simplified the view related code.
- Other small changes.