Clean up code, remove unused EventListeners and debugging lines