Minor fixes, new id generator