Refactor canvas setup into core namespace