Merge and fix #24

When searching for type hinting, we don't have to be so strict matching
the function declaration on the line since we don't have to match the whole
string end-to-end. The previous patterns failed to match any named function
as well.
Kudos go to @StanAngeloff for the code.