Fixing issue with class annotations.

Also fixed a recently introduced bug with detecting comments