Improved object id system to use python expression