refactoring start

Signed-off-by: AlexP <alex.prishchepov@yahoo.com>