Distributed systems: Code rearrangement