some code refactorings.