Added logger and moved listeners to different class