Fix class declaration detection

To be able to use something like this:
Application.register class Dispatcher ...
Fix class keyword detect condition
fix regexp
Merge pull request #3 from kerbyfc/patch-1

Detect class in function class (e.x. 'Application.register class Dispatcher ...')