Clean-up commented code and remove unused handlers.