Cleanup the listeners, fix some errors