Name refactoring, docs, added tests, refactored input structure