Minor refactoring. TODO added.