Finished changing inputs/outputs to classes (untested)