Little refactoring and some methods extraction