optimize Pack
generalize interfaces
generalize implementations
update tests