Changed field logger to log.
Simplified listener setups and hooks setup.