Remove obsolete callback parameter.
Add some checks for arguments.
Use toString instead of String constructor.