Initial commit of apg code base.