changed Logging and some code cleanup