Cleaned up Listener and started to clean up main