Move lib and test files in subdirs
Update autogen files
Add .gitignore
Expose the underlying log function