More logging and bugfixes. Made Listeners class.