Clean up, add more test code, and add .gitignore