Improved debug details

Debug details for an object now show all details of behaviour, and all
states along with their values.