Clone code generation

First pass at clone code gen. Goal is to have entities own their data
and no one else can change it except for the entity class itself.