Clean up a bit
Register the listener if Ghosts is enabled