Added git.mk to autogenerate gitnore files
Clean code and some documentation.