Added some tests for inputs
Implemented errors handling + added tests for them