Cleanup whitespace
Display API function names in log messages
Replace "got message" with "received message" in log messages
Make release_object function return an error if object has internal but no external references anymore
Update tests