Log class and less useless code