refactoring and layout

Signed-off-by: constpetrov <constant.petrov@gmail.com>