Fix deprecation warnings.
Use mapc as we don't need the return value.
Fix byte compiler warnings about free variables and functions and do some minor cleanup.
Add .gitignore