Added getInput and getOutput and more comments