Organize files, add tests