Refactored proxy creation

Signed-off-by: Aryunov Mikhail <rtti@mail.ru>