Add some missing local statemements and clean up unused variables.
Error on invalid family.
Add .gitignore.