Added some input parameter handling to main