add tests, move source files to src/