Rework into a more reasonable library
Add .gitignore