cleanup logging
refactor a little
populating some fields! :-D
fix for CWS