Added tests for clearing inputs
Added more tests and fixed minor bugs