Input COntrol
Input control, some reorganization of source files