Math corrections in listener, minor other changes