moved "test" stuff into its own package
modified Stub class, removed premature optimization :)