Add tests; fixes block variables in ext methods