Remove unused methods, make some variables private.