Cleaned up analyseInputs