Removing unused methods and fields