Replace extlib by batteries.
Fix style issues.