Extract a couple of methods, remove the deprecated log method