Refactor/canvas json layer