restructure files, add rather complex args parser and tests for it