Cleaned up controller generator