fixed JSON inputs, added tests for setup, changed structure a little bit