Fix logging to have limits for all log, and lots of little changes and some missing files.