Finishing work on the agent building code