Compacting code