Inputsand controllers

Code reestructure