Refactoring live preview

Change-Id: I351094b8d746d991b1f1d92f3dd097f092e3f0f5
Merge "Refactoring live preview"