add layers support in the canvas
refactor and clean app main app - part 1