Fixing IDs and moved to entity.