Mostly add log support, aside a few minors changes for further updates