Refactoring, add methods for timer tasks, add log support