Main file to handle input signal and processing