Added further support for input and a testing framework