Most object-oriented programs have imperfectly designed inheritance hi
erarchies and imperfectly factored methods, and these imperfections te
nd to increase with maintenance. Hence, even object-oriented programs
are more expensive to maintain? harder to understand and larger than n
ecessary. Automatic restructuring of inheritance hierarchies and refac
toring of methods can improve the design of inheritance hierarchies, a
nd the factoring of methods. This results in programs being smaller, h
aving better code re-use and being more consistent. This paper describ
es Guru, a prototype tool for automatic inheritance hierarchy restruct
uring and method refactoring of Self programs. Results from realistic
applications of the tool are presented.