Modeling Galaxies In Cosmological Simulations: Using Halo Cores To Model Galaxy Distributions In Clusters, And Constructing The Synthetic Galaxy Catalog Cosmodc2