Implemented Listener
Cleaned up main class