Getting rid of invokeMethod calls

Change-Id: I3687682d0cae4eff4259e171bca2fa11c08b561f
Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>