Move debugging functions to private