Added listener, some refactor