Change blocks structure. Incapsulate code of app block