API mostly finished. Using synthetic ids for entities.