Test for __invoke methods, fix for __invoke methods, a bit of logic cleanup, remove mockery (unused), lint tests in addition to code