Added control class to handle inputs