fixes a problem of missed dependencies

dependencies to classes mentioned in a method declaration didn't get collected. Honestly I have no idea why, but this does work. Tests for the win.

closes #18 by proofing that arrays aren't a problem.
found the actual problem and fixed it properly
added test to ensure that dependency inside method get found.

Seem to have worked all the time. First confusion came from the fact that Scala hides the dependency to java.lang.String