Bug fix+new functionality

Added support for methods inside Classes, so that it can be used with the new Class-Based Views.
Fixed middleware-->Middleware typo.