improved variable handling and unified object IDs