Don't add namespace if it is empty
Add kind so that class, proto and var regex matches are actually printed
Fix printing proto methods, blocks
Update tests
Chomp line just once
Make regexes slightly simpler