Title's replace, some code refactoring, little changes in log()