Refactoring 'common.dart' into 'refactor.dart'

Made transformIdentifiers handle methods as well.
Consolidated refactoring tests.