Now works with methods and functions

Also increased tests coverage