created logger and small fixes.