Various cleanup work. Enable logging in.