Totaly refactored canvas part