Minor refactoring was done.