Adding entity and collection code to repo