Readablity improvement by some refactorings