Changed logger, big refactor