coding new logger and some style fixes.