Minor refactoring, execution time logging is added